This invention relates to the field of computer systems. More particularly, an apparatus and method are provided for steering a received communication to one or more communication streams.
Traditionally, when a communication stream is opened on a communication interface (e.g., a Network Interface Card or NIC) of a host computing device, the stream is bound to a particular protocol. That protocol may act as a Service Access Point (SAP) for the stream. Each time a new stream is opened and associated with a SAP, an entry is added to a linked list of such associations.
When a packet, cell or other communication is received at the communication interface, the linked list is searched to individually identify each stream associated with the SAP of the communication. This requires every list entry to be visited at least once. Each entry is checked to determine if it corresponds to a communication stream that is on the same interface and associated with the same SAP as the new communication.
Naturally, the list would grow as more communication streams are opened on the host, thereby increasing the amount of time needed to search the list and forward the communication to each associated stream. Because the number of streams associated with a SAP could not be known until the entire linked list is searched, a device driver for the communication interface, or an upper layer protocol may make an unnecessary copy or duplicate of the packet, thereby decreasing efficiency.
In some computing devices, special allowance was made for a selected SAP (e.g., one that corresponds to a protocol reflected in more communications than any other protocol). In particular, in the soft state data structure for a communication interface, an entry would be made to identify a communication stream associated with the selected SAP. When a packet was received with that SAP, the linked list of streams could be ignored, and the associated communication stream could be identified by checking the soft state data structure. However, if there was more than one communication stream associated with the selected SAP, then this special treatment could not be applied.